package ca.usherbrooke.domus.sipnmove2.sip;

/**
 * SIP User information on his account
 */
public class SipUserInformation {

	private String name;
	private String ipAddress;
	private Integer port;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the ipAddress
	 */
	public String getIpAddress() {
		return ipAddress;
	}

	/**
	 * @param ipAddress
	 *            the ipAddress to set
	 */
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	/**
	 * @return the port
	 */
	public Integer getPort() {
		return port;
	}

	/**
	 * @param port
	 *            the port to set
	 */
	public void setPort(Integer port) {
		this.port = port;
	}

	/**
	 * Return the host name corresponding to IP + Port
	 * 
	 * @return host name
	 */
	public String getHost() {
		return ipAddress + ":" + port;
	}

	/**
	 * Return full address like : kilian@domus:5060
	 * 
	 * @return the address
	 */
	public String getAddress() {
		return name + "@" + getHost();
	}

	/**
	 * Return full sip address like : sip:kilian@domus:5060
	 * 
	 * @return the address
	 */
	public String getSipAddress() {
		return "sip:" + name + "@" + getHost();
	}

}
